Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Undefined Reference  (Read 4667 times)

Smak64

  • Bay Watcher
    • View Profile
Undefined Reference
« on: February 09, 2018, 08:44:52 am »

Heya. Sorry for starting a new topic about this when there's like 50 other on compiling (though they're old and I don't want to necro), but I've been trying to figure out how to compile LCS on windows for about a week, and I've finally hit this step.
pdcurses is installed.
I've changed it from -lncurses to -lpdcurses.
I'm using code::blocks with mingw

While I've finally stopped getting "cannot find -lncurses" from my own stupidity, I'm now just getting 50 cases of undefined reference in the first file. I've been looking around online for a solution regarding pdcurses, but the only solution I've found is to check that I've put pdcurses in correctly. Which I've done three times now, and I've been getting this error over and over.

I don't know what to do. Can someone who's compiled and run into this error, or just someone who's used pdcurses before and had the error, tell me how you managed to solve it please? I'm honestly desperate for an answer at this point.
Logged

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: Undefined Reference
« Reply #1 on: February 09, 2018, 04:18:54 pm »

I can only offer emotional support.  I'm not sure if anyone currently on the forums even knows how to get pdcurses to compile using code::blocks with mingw.
I use Visual Studio 2015 (which is a terrible IDE IMHO) and Terra Vitae is compiled with GCC, (and uses ncurses, as it is compiled for Mac).

If you can specify which version of LCS and which version of PDCurses you're using, since neither is maintained by their original programmers, and both have at least a dozen available forks that sprang up over the past ten years, that would help us get on the same page.
Logged
LCS 4.12 Thread
https://discord.gg/HYbss8eswM
Quote
Many people, meeting Aziraphale for the first time, formed three impressions: that he was English, that he was intelligent, and that he was gayer than a tree full of monkeys on nitrous oxide.
Constitution of the Confederate States
Article I Sec. 9 4
No bill of attainder, ex post facto law, or law denying or impairing the right of property in negro slaves shall be passe

Smak64

  • Bay Watcher
    • View Profile
Re: Undefined Reference
« Reply #2 on: February 09, 2018, 05:01:29 pm »

Thanks for replying to begin with, wasn't expecting to get any response.

I'm working with the source code packaged in version 4.12.5 of LCS, and using version 34 of pdcurses since there's a pre-compiled version and I couldn't figure out how to compile one myself either.
I've tried using visual studio community 2017 as well, which gets a step further, but then throws up a LNK2001 unresolved external symbol. So I've gone with code::blocks because on the bright side it's honest enough to just say it's borked rather than pretend it's working.

As to why I'm working with an old version, there's 2 reasons.
1: I was having trouble playing 4.12.07. Sometimes when leaving a site (particularly after stealth kills) or at the end of a month the game would just crash. I haven't tested 4.12.08 yet, so maybe that issue with names was causing it.
2: Doing small modding for my own amusement, really. Small stuff like adding in a few types of drugs into loot.xml, as well as used needles, and then both making the drugs really rare loot at the crack house (mostly just used needles) and changing the "The squad found some drugs" result from the CEO's safe actually give you loot drugs rather than doing nothing.
Logged

IsaacG

  • Bay Watcher
  • Mad Engineer
    • View Profile
    • JJoseph on Deviantart
Re: Undefined Reference
« Reply #3 on: February 09, 2018, 06:19:25 pm »

Thanks for replying to begin with, wasn't expecting to get any response.

I'm working with the source code packaged in version 4.12.5 of LCS, and using version 34 of pdcurses since there's a pre-compiled version and I couldn't figure out how to compile one myself either.
I've tried using visual studio community 2017 as well, which gets a step further, but then throws up a LNK2001 unresolved external symbol. So I've gone with code::blocks because on the bright side it's honest enough to just say it's borked rather than pretend it's working.
I can't get Visual Studio 2017 to compile either.  Since Microsoft mostly doesn't allow downloads of VS 2015, knowing how to get it to compile with VS 2015 is virtually useless knowledge...
AFAIK 4.12.5 is using version 3.4 of pdcurses, so that should be fine.

The problem could be SDL, the sound library.  People have a lot of trouble with that.  I had to recompile SDL from source to get it to work with VS 2015.
https://www.libsdl.org/projects/SDL_mixer/
https://www.libsdl.org/download-2.0.php

They have separate downloads for Visual Studio and MingW.  Hope that helps.
1: I was having trouble playing 4.12.07. Sometimes when leaving a site (particularly after stealth kills) or at the end of a month the game would just crash. I haven't tested 4.12.08 yet, so maybe that issue with names was causing it.
If you've got a save file that consistently causes the end of month crash, that would be a godsend.
Leaving a site, that might be a car chase issue.
Logged
LCS 4.12 Thread
https://discord.gg/HYbss8eswM
Quote
Many people, meeting Aziraphale for the first time, formed three impressions: that he was English, that he was intelligent, and that he was gayer than a tree full of monkeys on nitrous oxide.
Constitution of the Confederate States
Article I Sec. 9 4
No bill of attainder, ex post facto law, or law denying or impairing the right of property in negro slaves shall be passe

Smak64

  • Bay Watcher
    • View Profile
Re: Undefined Reference
« Reply #4 on: February 09, 2018, 07:20:38 pm »

If nothing else, it's a direction to look in to figure out what I'm doing wrong. Thank you.

I'll go grab 4.12.07 again and see if I can get it crashing. I know for sure it wasn't car chase related though, because I had it happen on both assaults on a site (Running and gunning, so to speak) and sneaking around stabbing people in the back. If you don't set off a full alarm, then you don't get a chase, so that's where I rule it out.
Logged