Menu

SphinxBase Compilation Problem with VS2008

Help
2009-12-04
2012-09-22
  • StretchTiberius

    StretchTiberius - 2009-12-04

    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?

     
  • Nickolay V. Shmyrev

    Hm, it should be _popen and we have corresponding ifdef in this file

     
  • Nickolay V. Shmyrev

    Please make sure your project has

    PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32;HAVE_CONFIG_H"

    WIN32 is important here

     
  • Nickolay V. Shmyrev

    Ups, it's sucking markdown. I was fun of Joel till I started using it. Still,
    the function _popen should be there:

    http://msdn.microsoft.com/en-
    us/library/96ayss4b.aspx

     
  • StretchTiberius

    StretchTiberius - 2009-12-07

    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?

     
  • Nickolay V. Shmyrev

    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.

     
  • StretchTiberius

    StretchTiberius - 2009-12-08

    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?

     
  • Nickolay V. Shmyrev

    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.

     
  • Nickolay V. Shmyrev

    Hi stretchtiberius, this issue should be fixed now. That buggy code was simply
    removed.

     
  • StretchTiberius

    StretchTiberius - 2009-12-21

    Thanks so much nshmyrev. It has compiled and has been working nicely.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.