I am trying to compile the svn latest version of sphinxbase using Visual
Studio 2008. However, I get the following linking error:
1>pio.obj : error LNK2019: unresolved external symbol _popen referenced in
function _fopen_comp
1>.../../lib/Debug/sphinxbase.dll : fatal error LNK1120: 1 unresolved
externals
Any ideas why this is?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Probably type of the project has to be changed. For example only console
applications could support _popen. As I linked above, this function should be
a part of the core library.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I looked at the link you posted. However, I still don't understand the issue.
Forgive my ignorance. All I am compiling is sphinxbase, which should produce
some libraries. I am not creating a application yet.
How do you change the project type of sphinxbase?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No idea to be honest, sorry. If it did compile for you before, can you find
which exact change break the compilation? It's fast with bisection of svn
versions.
Also probably you'd like to compile sample C library just with _popen
example, probably it wil give you a hint.
Otherwise it's hard to say what's happening without Windows here.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to compile the svn latest version of sphinxbase using Visual
Studio 2008. However, I get the following linking error:
1>pio.obj : error LNK2019: unresolved external symbol _popen referenced in
function _fopen_comp
1>.../../lib/Debug/sphinxbase.dll : fatal error LNK1120: 1 unresolved
externals
Any ideas why this is?
Hm, it should be _popen and we have corresponding ifdef in this file
Please make sure your project has
PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;HAVE_CONFIG_H"
WIN32 is important here
http://msdn.microsoft.com/en-
us/library/96ayss4b.aspx
Thanks for your quick replies. I still can not figure it out. I had the
following preprocessor definitions in the sphinxbase project:
DEBUG;WIN32;_WINDOWS;_USRDLL;SPHINXBASE_EXPORTS;HAVE_CONFIG_H;SPHINXDLL;_CRT
SECURE_NO_DEPRECATE;
I added the ones you suggested and still have the same linking error. Do you
think I need to add any additional lib dependencies?
Probably type of the project has to be changed. For example only console
applications could support _popen. As I linked above, this function should be
a part of the core library.
I looked at the link you posted. However, I still don't understand the issue.
Forgive my ignorance. All I am compiling is sphinxbase, which should produce
some libraries. I am not creating a application yet.
How do you change the project type of sphinxbase?
No idea to be honest, sorry. If it did compile for you before, can you find
which exact change break the compilation? It's fast with bisection of svn
versions.
Also probably you'd like to compile sample C library just with _popen
example, probably it wil give you a hint.
Otherwise it's hard to say what's happening without Windows here.
Hi stretchtiberius, this issue should be fixed now. That buggy code was simply
removed.
Thanks so much nshmyrev. It has compiled and has been working nicely.