Hi,
I have been trying to get an external library to work within visual studio 2013, but am getting error 2019 unresolved external symbol for all three functions within the code. Everything seems to be linking fine, I can jump to the definition/declaration in the header file with F12, the code I am using is test code that comes with the library. Could anyone please explain what is going on? I have pasted my code below and the error message too.
Best, Sam
ERROR MESSAGES:
1>------ Build started: Project: SBML_model_sim, Configuration: Debug Win32 ------
1>Source.obj : error LNK2019: unresolved external symbol _free_myResult referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol _write_csv referenced in function _main
1>Source.obj : error LNK2019: unresolved external symbol _simulateSBMLFromFile referenced in function _main
1>c:\Users\sam\Documents\Visual Studio 2013\Projects\SBML_model_sim\Debug\SBML_model_sim.exe : fatal error LNK1120: 3 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
CODE:
#include <stdio.h> #include <iostream> #include "libsbmlsim\libsbmlsim.h" using namespace std; int main(void) { /* * Simulate sbml.xml to time=20 with dt=0.1, print_interval=10 * by 4th-order Runge-Kutta Method. */ myResult *r = simulateSBMLFromFile("Repressilator.xml", 20, 0.1, 10, 0, MTHD_RUNGE_KUTTA, 0); write_csv(r, "result.csv"); /* Export simulation result as CSV file */ free_myResult(r); /* Free Result object */ return 0; }
Website of the library:
http://fun.bio.keio.ac.jp/software/libsbmlsim/