Jump to content
The Dark Mod Forums

Problem with first-time build of TDM 2.11 dev in VS 2022


Geep

Recommended Posts

Greets. I just setup VS 2022 Community/VC++/MFC on a fresh box, and did a Checkout with TortoiseSVC from the public repository of build 16481-9881 (matching a fresh 9881 dev install of TDM environment, as required).

When I do the build, I get a link error: Can't find file libavcodec.lib

I'm not finding that file in the working repository, although I do see the libavcodec folder and avcodec.lib

If I select DarkModTools/Properties, I'm able to go to the Link/Input field and see where libavcodec.lib is listed, but I can't edit it to change it to avcodec.lib (says it's inherited)

I'm kinda rusty, haven't used VS since 2015, so this may be a trivial thing. Help?

Link to comment
Share on other sites

On 5/1/2022 at 3:35 AM, Geep said:

Greets. I just setup VS 2022 Community/VC++/MFC on a fresh box, and did a Checkout with TortoiseSVC from the public repository of build 16481-9881 (matching a fresh 9881 dev install of TDM environment, as required).

When I do the build, I get a link error: Can't find file libavcodec.lib

The third-party libs were changed somewhere around that time.
Maybe I had some uncommitted changes when published that update?...

Try revision 9882, or revision 9888, or 9891.

  • Like 1
Link to comment
Share on other sites

Used the public svn, not the team svn. Some forum comment made me think that 9881 was more stable its successor. I don't really need the very latest, at least not right now. TDM 2.10 would've been fine too, but who knows, maybe some issues building under VS 2022?

I'll try a later 2.11 revision as stgatilov suggests... probably won't be today though.

Link to comment
Share on other sites

The build succeeds now with the latest. Yea!

However, evidently the directory structure is not quite right for debug to work. I followed what the compile guide said (I think), with these 2 directories:

...Games/tdm11dev/darkmod_src/trunk/TheDarkMod.sln (etc.) [using TortoiseSVN]

...Games/tdm11dev/darkmod/TheDarkModx64.exe (& all the .pk4s, etc) [using tdm_installer]

It appears that the build process puts the results in

...Games/tdm11dev/darkmod_src/darkmod/

I tried changing adding a "." to the project output location to move the directory up one, i.e., DarkModTools property sheet, for the debug x64 configuration: Configuration Properties; General;

  Output Directory [changed from] $(SolutionDir)..\darkmod\ [to] $(SolutionDir)...\darkmod\

But that seemed to generate build errors subsequently, so reverted. I can probably munge this up so it works, but thought I'd ask your suggestions first.

Link to comment
Share on other sites

Ideally, you should have checked out "trunk" directory only, so that its contents get into "tdm11dev/darkmod_src" instead of "tdm11dev/darkmod_src/trunk".

Do you BTW have all the "branches" and "tags" directories near "trunk" ?
Maybe not, because they are still closed for public for some weird reason...

Link to comment
Share on other sites

OK, I'll try to rearrange to that directory layout. I'll have to lookup how to do that without screwing up Tortoise.

I'm not on that machine at the moment, so I can't check your BTW. I don't remember about "branches", but I do remember a local "tags" directory... don't know if it was populated.

Link to comment
Share on other sites

Directory structure is working now.

The path to the executable is a bit funky (via the source directory), when local debugging is run directly from VS. It becomes:

[my drive and user account]\Games\tdm11dev\darkmod_src\..\darkmod\TheDarkModx64.exe

That's set by the call in win_main.cpp to Sys_EXEPath, which gets the path from GetModuleFileName (resolves to GetModuleFileNameA). The string is passed up to Sys_DefaultBasePath (which strips the filename off), and back up to the game init code.

Don't know if GetModuleFileNameEx would be better for this, give a cleaner path. Or if this weird path breaks anything, other than unnecessarily stressing the MAX_PATH boundary.

Do you guys usually set one of the "fs_..." command-line args to deal with this?

 

Link to comment
Share on other sites

On 5/11/2022 at 10:55 PM, Geep said:

Directory structure is working now.

The path to the executable is a bit funky (via the source directory), when local debugging is run directly from VS. It becomes:

[my drive and user account]\Games\tdm11dev\darkmod_src\..\darkmod\TheDarkModx64.exe

That's set by the call in win_main.cpp to Sys_EXEPath, which gets the path from GetModuleFileName (resolves to GetModuleFileNameA). The string is passed up to Sys_DefaultBasePath (which strips the filename off), and back up to the game init code.

Don't know if GetModuleFileNameEx would be better for this, give a cleaner path. Or if this weird path breaks anything, other than unnecessarily stressing the MAX_PATH boundary.

Do you guys usually set one of the "fs_..." command-line args to deal with this?

No, we simply use the recommended directory structure, and everything works out of the box.

I mean:

  • C:\thedarkmod\darkmod_src\TheDarkMod.sln
  • C:\thedarkmod\darkmod\TheDarkModx64.exe

One thing I'll say for sure: better not mess with paths without critical need 😄
You can break too much stuff.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...