将cplex链接到c++; 我试图将CPLEX(版本12·6 2)链接到Mac OS优诗美地国家公园上的C++ NETBeS(版本8.2)(107.4)。当我从同事处导入现有项目并运行主文件时,一切正常,并生成解决方案。当我对主文件进行任何修改时,会收到以下错误消息: cd '/Users/user/Desktop/user ' /usr/bin/make -f Makefile CONF=Debug "/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf "/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/milp_techreport mkdir -p build/Debug/GNU-MacOSX rm -f "build/Debug/GNU-MacOSX/main_TechRep.o.d" g++ -stdlib=libstdc++ -c -g -DIL_STD -I../../Applications/IBM/ILOG/CPLEX_Studio1262/cplex/include -I../../Applications/IBM/ILOG/CPLEX_Studio1262/concert/include -I/Applications/biogeme-2.5/libraries/linearAlgebra -I/Applications/biogeme-2.5/libraries/utils -I/Applications/biogeme-2.5/libraries/randomNumbers -MMD -MP -MF "build/Debug/GNU-MacOSX/main_TechRep.o.d" -o build/Debug/GNU-MacOSX/main_TechRep.o main_TechRep.cpp mkdir -p dist/Debug/GNU-MacOSX g++ -stdlib=libstdc++ -o dist/Debug/GNU-MacOSX/milp_techreport build/Debug/GNU-MacOSX/main_TechRep.o -L../../Applications/IBM/ILOG/CPLEX_Studio1262/cplex/lib/x86-64_osx/static_pic -L../../Applications/IBM/ILOG/CPLEX_Studio1262/concert/lib/x86-64_osx/static_pic -lconcert -lcplex -lilocplex -lcplexdistmip 0 0x10825b172 __assert_rtn + 144 1 0x108294af6 archive::File<x86_64>::makeObjectFileForMember(archive::File<x86_64>::Entry const*) const + 1138 2 0x108293e90 archive::File<x86_64>::justInTimeforEachAtom(char const*, ld::File::AtomHandler&) const + 122 3 0x1082ae431 ld::tool::InputFiles::searchLibraries(char const*, bool, bool, bool, ld::File::AtomHandler&) const + 265 4 0x1082b7710 ld::tool::Resolver::resolveUndefines() + 160 5 0x1082b9a6f ld::tool::Resolver::resolve() + 79 6 0x10825be90 main + 812 7 0x7fff902365c9 start + 1 A linker snapshot was created at: /tmp/milp_techreport-2017-02-21-155344.ld-snapshot ld: Assertion failed: (memberIndex != 0), function makeObjectFileForMember, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-253.3.3/src/ld/parsers/archive_file.cpp, line 355. clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [dist/Debug/GNU-MacOSX/milp_techreport] Error 1 make[1]: *** [.build-conf] Error 2 make: *** [.build-impl] Error 2 cd'/Users/user/Desktop/user' /usr/bin/make-f Makefile CONF=Debug “/Applications/Xcode.app/Contents/Developer/usr/bin/make”-f nbproject/Makefile-Debug.mk QMAKE=SUBPROJECTS=.build conf “/Applications/Xcode.app/Contents/Developer/usr/bin/make”-f nbproject/Makefile-Debug.mk dist/Debug/GNU MacOSX/milp_techreport mkdir-p build/Debug/gnumacosx rm-f“构建/调试/GNU MacOSX/main_TechRep.o.d” g++-stdlib=libstdc++-c-g-DIL_STD-I..//应用程序/IBM/ILOG/CPLEX_Studio1262/CPLEX/include-I..//应用程序/IBM/ILOG/CPLEX_Studio1262/concert/include-I/Applications/biogeme-2.5/linearAlgebra-I/Applications/biogeme-2.5/libraries-I/Applications/biogeme-2.5/libraries/randomNumbers-MMD-MF“build/Debug/GNU MacOSX/main_TechRep.o.d”-o build/Debug/GNU MacOSX/main_TechRep.o main_TechRep.cpp mkdir-p dist/Debug/gnumacosx g++-stdlib=libstdc++-o dist/Debug/GNU-MacOSX/milp-techreport build/Debug/GNU-MacOSX/main-TechRep.o-L.././Applications/IBM/ILOG/CPLEX\u Studio1262/CPLEX/lib/x86-64\u-osx/static\u pic-L.././Applications/IBM/ILOG/CPLEX/CPLEX-Studio1262/concert/lib/x86-64\u-osx/static\u-lilocplex-lcdistmip 0 0x10825b172\uuuuuRTN+144 1 0x108294af6存档::文件::MakeObjectFileFormMember(存档::文件::条目常量*)常量+1138 2 0x108293e90存档::文件::justInTimeforEachAtom(字符常量*,ld::文件::AtomHandler&)常量+122 3 0x1082ae431 ld::工具::输入文件::搜索库(字符常量*,布尔,布尔,布尔,ld::文件::AtomHandler&)常量+265 4 0x1082b7710 ld::工具::解析器::resolveUndefines()+160 5 0x1082b9a6f ld::tool::Resolver::resolve()+79 6 0x10825be90干管+812 7 0x7fff902365c9启动+1 已在以下位置创建链接器快照: /tmp/milp_techreport-2017-02-21-155344.ld-snapshot ld:断言失败:(memberIndex!=0),函数makeObjectFileFormMember,file/Library/Caches/com.apple.xbs/Sources/ld64/ld64-253.3.3/src/ld/parsers/archive_file.cpp,第355行。 叮当声:错误:链接器命令失败,退出代码为1(使用-v查看调用) make[2]:***[dist/Debug/GNU MacOSX/milp_techreport]错误1 生成[1]:***[.build conf]错误2 make:**[.build impl]错误2

将cplex链接到c++; 我试图将CPLEX(版本12·6 2)链接到Mac OS优诗美地国家公园上的C++ NETBeS(版本8.2)(107.4)。当我从同事处导入现有项目并运行主文件时,一切正常,并生成解决方案。当我对主文件进行任何修改时,会收到以下错误消息: cd '/Users/user/Desktop/user ' /usr/bin/make -f Makefile CONF=Debug "/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf "/Applications/Xcode.app/Contents/Developer/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/milp_techreport mkdir -p build/Debug/GNU-MacOSX rm -f "build/Debug/GNU-MacOSX/main_TechRep.o.d" g++ -stdlib=libstdc++ -c -g -DIL_STD -I../../Applications/IBM/ILOG/CPLEX_Studio1262/cplex/include -I../../Applications/IBM/ILOG/CPLEX_Studio1262/concert/include -I/Applications/biogeme-2.5/libraries/linearAlgebra -I/Applications/biogeme-2.5/libraries/utils -I/Applications/biogeme-2.5/libraries/randomNumbers -MMD -MP -MF "build/Debug/GNU-MacOSX/main_TechRep.o.d" -o build/Debug/GNU-MacOSX/main_TechRep.o main_TechRep.cpp mkdir -p dist/Debug/GNU-MacOSX g++ -stdlib=libstdc++ -o dist/Debug/GNU-MacOSX/milp_techreport build/Debug/GNU-MacOSX/main_TechRep.o -L../../Applications/IBM/ILOG/CPLEX_Studio1262/cplex/lib/x86-64_osx/static_pic -L../../Applications/IBM/ILOG/CPLEX_Studio1262/concert/lib/x86-64_osx/static_pic -lconcert -lcplex -lilocplex -lcplexdistmip 0 0x10825b172 __assert_rtn + 144 1 0x108294af6 archive::File<x86_64>::makeObjectFileForMember(archive::File<x86_64>::Entry const*) const + 1138 2 0x108293e90 archive::File<x86_64>::justInTimeforEachAtom(char const*, ld::File::AtomHandler&) const + 122 3 0x1082ae431 ld::tool::InputFiles::searchLibraries(char const*, bool, bool, bool, ld::File::AtomHandler&) const + 265 4 0x1082b7710 ld::tool::Resolver::resolveUndefines() + 160 5 0x1082b9a6f ld::tool::Resolver::resolve() + 79 6 0x10825be90 main + 812 7 0x7fff902365c9 start + 1 A linker snapshot was created at: /tmp/milp_techreport-2017-02-21-155344.ld-snapshot ld: Assertion failed: (memberIndex != 0), function makeObjectFileForMember, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-253.3.3/src/ld/parsers/archive_file.cpp, line 355. clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [dist/Debug/GNU-MacOSX/milp_techreport] Error 1 make[1]: *** [.build-conf] Error 2 make: *** [.build-impl] Error 2 cd'/Users/user/Desktop/user' /usr/bin/make-f Makefile CONF=Debug “/Applications/Xcode.app/Contents/Developer/usr/bin/make”-f nbproject/Makefile-Debug.mk QMAKE=SUBPROJECTS=.build conf “/Applications/Xcode.app/Contents/Developer/usr/bin/make”-f nbproject/Makefile-Debug.mk dist/Debug/GNU MacOSX/milp_techreport mkdir-p build/Debug/gnumacosx rm-f“构建/调试/GNU MacOSX/main_TechRep.o.d” g++-stdlib=libstdc++-c-g-DIL_STD-I..//应用程序/IBM/ILOG/CPLEX_Studio1262/CPLEX/include-I..//应用程序/IBM/ILOG/CPLEX_Studio1262/concert/include-I/Applications/biogeme-2.5/linearAlgebra-I/Applications/biogeme-2.5/libraries-I/Applications/biogeme-2.5/libraries/randomNumbers-MMD-MF“build/Debug/GNU MacOSX/main_TechRep.o.d”-o build/Debug/GNU MacOSX/main_TechRep.o main_TechRep.cpp mkdir-p dist/Debug/gnumacosx g++-stdlib=libstdc++-o dist/Debug/GNU-MacOSX/milp-techreport build/Debug/GNU-MacOSX/main-TechRep.o-L.././Applications/IBM/ILOG/CPLEX\u Studio1262/CPLEX/lib/x86-64\u-osx/static\u pic-L.././Applications/IBM/ILOG/CPLEX/CPLEX-Studio1262/concert/lib/x86-64\u-osx/static\u-lilocplex-lcdistmip 0 0x10825b172\uuuuuRTN+144 1 0x108294af6存档::文件::MakeObjectFileFormMember(存档::文件::条目常量*)常量+1138 2 0x108293e90存档::文件::justInTimeforEachAtom(字符常量*,ld::文件::AtomHandler&)常量+122 3 0x1082ae431 ld::工具::输入文件::搜索库(字符常量*,布尔,布尔,布尔,ld::文件::AtomHandler&)常量+265 4 0x1082b7710 ld::工具::解析器::resolveUndefines()+160 5 0x1082b9a6f ld::tool::Resolver::resolve()+79 6 0x10825be90干管+812 7 0x7fff902365c9启动+1 已在以下位置创建链接器快照: /tmp/milp_techreport-2017-02-21-155344.ld-snapshot ld:断言失败:(memberIndex!=0),函数makeObjectFileFormMember,file/Library/Caches/com.apple.xbs/Sources/ld64/ld64-253.3.3/src/ld/parsers/archive_file.cpp,第355行。 叮当声:错误:链接器命令失败,退出代码为1(使用-v查看调用) make[2]:***[dist/Debug/GNU MacOSX/milp_techreport]错误1 生成[1]:***[.build conf]错误2 make:**[.build impl]错误2,c++,netbeans,cplex,C++,Netbeans,Cplex,我们比较了我们的配置,它们看起来是一样的。你知道这是什么原因吗 提前感谢您!!断言失败:(memberIndex!=0)此失败可能是关键。您知道解决方案是什么吗?

我们比较了我们的配置,它们看起来是一样的。你知道这是什么原因吗


提前感谢您!!

断言失败:(memberIndex!=0)
此失败可能是关键。您知道解决方案是什么吗?