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

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 6 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...