Browse Source

fix go linking

pull/1669/head
idk 3 years ago
parent
commit
abee29719d
No known key found for this signature in database
GPG Key ID: D75C03B39B5E14E1
  1. 2
      Makefile
  2. 14
      libi2pd_wrapper/api.go
  3. 3
      libi2pd_wrapper/capi.cpp

2
Makefile

@ -123,7 +123,7 @@ $(ARLIB): $(LIB_OBJS) @@ -123,7 +123,7 @@ $(ARLIB): $(LIB_OBJS)
$(ARLIB_CLIENT): $(LIB_CLIENT_OBJS)
$(AR) -r $@ $^
$(ARLIB_WRAP): $(LIB_OBJS)
$(ARLIB_WRAP): $(WRAP_LIB_OBJS)
$(AR) -r $@ $^
$(ARLIB_LANG): $(LANG_OBJS)

14
libi2pd_wrapper/api.go

@ -1,7 +1,17 @@ @@ -1,7 +1,17 @@
package api
/*
#cgo CXXFLAGS: -I${SRCDIR}/../i18n -I${SRCDIR}/../libi2pd_client -g -Wall -Wextra -Wno-unused-parameter -pedantic -Wno-psabi -fPIC -D__AES__ -maes
#cgo LDFLAGS: -latomic -lcrypto -lssl -lz -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread -lstdc++
* Copyright (c) 2013-2020, The PurpleI2P Project
*
* This file is part of Purple i2pd project and licensed under BSD3
*
* See full license text in LICENSE file at top of project tree
*/
/*
#cgo CXXFLAGS: -I${SRCDIR}/../i18n -I${SRCDIR}/../libi2pd_client -I${SRCDIR}/../libi2pd -g -Wall -Wextra -Wno-unused-parameter -pedantic -Wno-psabi -fPIC -D__AES__ -maes
#cgo LDFLAGS: -L${SRCDIR}/../ -l:libi2pd.a -latomic -lcrypto -lssl -lz -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread -lstdc++
*/
import "C"
// -D, -U, -I, and

3
libi2pd_wrapper/capi.cpp

@ -85,10 +85,9 @@ void C_TerminateI2P () @@ -85,10 +85,9 @@ void C_TerminateI2P ()
return i2p::api::TerminateI2P();
}
void C_StartI2P ()//std::ostream *logStream)
void C_StartI2P ()
{
std::shared_ptr<std::ostream> logStream;
//cppLogStream(&out);
return i2p::api::StartI2P(logStream);
}

Loading…
Cancel
Save