Unable to compile correctly with Visual C Express

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
ikke_nl
Junior Member
Junior Member
Posts: 13
Joined: 2007-04-17, 23:20 UTC

Unable to compile correctly with Visual C Express

Post by *ikke_nl »

Hi,

I am trying to get familiar with writing plug-ins but for some reason I cannot compile it correctly.

I am trying to make a content plugin according to the 2.1se content plugin help and the file_sys source files. For this I use Visual C++, because it is free and I was under the assumption that this was the easiest. When I compile the DLL and rename it to .WDX, the plug-in does not work:
- I cannot get a fieldname, I cannot get a detectstring in TC.
To verify this, I have tried WDX_tester, so I can see if all my routines can be accessed and if they return any fields, and they don't. This console program normally returns all available routines and it says that there are no routines, not even one.

The code is almost entirely according to the filesys_src example that can be downloaded with the website with the help. I have not changed anything in the compile options in Visual C++ express, only one: that I am making a DLL.

-Does anyone have a idea what kind of mistake I have made?
- Another compiler, but is there one with a good IDE?
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2ikke_nl
Dunno if it helps but you can check source codes of my plugins (32bit) at:
https://skydrive.live.com/?cid=e12762cbdafb3c47&id=E12762CBDAFB3C47%21318#cid=E12762CBDAFB3C47&id=E12762CBDAFB3C47%21126

They may be spaghetti coded but most (all?) of them were made with VS Express. You can compare project files to get right configuration settings.

AFAIR: when I was starting my play with them, I had problems with proper exports definitions.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
ikke_nl
Junior Member
Junior Member
Posts: 13
Joined: 2007-04-17, 23:20 UTC

Post by *ikke_nl »

I have taken WDX_empty_0.03 as comparison. Compiling it works, according to WDX_tester.

It seems that I do not have a *.def file.

I'll look into it why I need it and if there are other differences.
Thanks!
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ikke_nl, if you compile .CPP file, compiler will export your functions with decoration, if you compile .C file, it will add prefix "_". In any case .DEF file allows to specify exact names of your exported functions. You may use plugin FileInfo (or any PE info tool) to look which functions your plugin exports.
Post Reply