Archive: About Plugins


About Plugins
  Hello

I know that these are questions too generals but ...

a)Is better to do the plugins with c or with c++ or is indiferent ?

b)The plugins in plugins/contrib have the files *.dsp and *.dsw . I think that these are files of Visual C++ . Is better to use it?

c)Whats compiler is better to use ? Dev-c++, lcc32, visual c++ ...?

Thanks in advance


a) Whatever, dude :p .... but if you are in c++, remember to add the extern "C" thingy...

b) Visual Studio 4 and up (even .NET) can handle them... I think Dev-C++ use it as project converter...

c) Most of the source code are in Visual Studio 6 nor .NET. but you can open the the files (.c, .cpp, .h) in other IDEs and change whatever you need to change.... of course you need to know the syntax of the compiler.... for example MinGW, which comes in DEv-C++,isn't 100% compatible with the Visual C++ syntax.... <_<


The Microsoft compiler produces smaller executables. You can use the new free toolkit in combination with the Platform SDK.


Thanks a lot :up:

@kichik :: Your second link don´t work :(. Can you attach the link again? Thanks

BTW , The free toolkit can work with projects ? I thought that it can work only with a simple file (a limitation).


Thanks in advance


Platform SDK - http://www.microsoft.com/msdownload/...sdk/sdkupdate/

I don't know if the toolkit works with project files, but nothing stops you from calling cl.exe on your own. cl.exe accepts more than one file.


Thanks Kichik

You starts to work early ;)

Best Regards


Hello again

I see the link and there´s "Windows XP SP2 Platform SDK" but this not talk about win95,win98,.. That would to say that if I do a plugin with this sdk this plugin wouldn´t be compatible with the others operative sistems (win95,win98)?.

Thanks in advance

Note :: Sorry if this is an trivial question :(


No, it doesn't mean it won't work on versions other than XP SP2. It simply means it contains the tools required to build applications that take advantage of the new features XP SP2 has to offer.


Thanks a lot


Hello

I install the Visual C++ Toolkit 2003 and the SDK.
The configuration of the shortcut is:


Set PATH=C:Archivos de programaMicrosoft Visual C++ Toolkit 2003bin;%PATH%

>Set INCLUDE=C:Archivos de programaMicrosoft Visual C++ Toolkit 2003include;%INCLUDE%
>Set INCLUDE=%INCLUDE%;C:Archivos de programaMicrosoft Platform SDK for Windows XP SP2Include
>Set LIB=C:Archivos de programaMicrosoft Visual C++ Toolkit 2003lib;%LIB%
>Set LIB=%LIB%;C:Archivos de programaMicrosoft Platform SDK for Windows XP SP2lib
>
But when I compile the exdll.c (with the exdll.h) I see this error:

With this sentence Cl exdll.c /LD


dll

>/dll
>/implib:exdll.lib
exdll
.obj
Creating library exdll.lib and object exdll.exp
exdll.obj : error LNK2019: unresolved external symbol _
renced infunction _myFunction
exdll.obj : error LNK2019: unresolved external symbol _
d infunction _myFunction
exdll.dll : fatal error LNK1120: 2 unresolved externals
>
a) What I am doing wrong?

b) The sentence is the correct? What´s the sentence to do the dll more fast, little and good?

The help of cl.exe (cl /?) is (see file attached).

Thanks in advance

The error messages got trimmed, but according to the posted command line you've used, it seems you forgot to include a list of libraries to link to. In ExDLL's case, only kernel32.lib is needed. More complicated plug-ins may require more libraries.

To get the smallest plug-in possible you need some more switches. Below is an example of compiling the UserInfo plug-in with these switches:

cl /O1 UserInfo.c /LD kernel32.lib advapi32.lib /link /OPT:NOWIN98 /NODEFAULTLIB /ENTRY:DllMain


Thanks for your reply but the errors continues .
With this sentence :

cl /O1 exdll.c /LD kernel32.lib

The errors are :


dll

>/dll
>/implib:exdll.lib
exdll
.obj
kernel32.lib
Creating library exdll.lib and object exdll.exp
exdll.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 refe
renced infunction _myFunction
exdll.obj : error LNK2019: unresolved external symbol __imp__wsprintfA reference
d infunction _myFunction
exdll.dll : fatal error LNK1120: 2 unresolved externals
>
Thanks in advance

Use user32.lib too. For each error like that, go to MSDN and look for the "missing" API function. On the very bottom of the MSDN page, it says which library is required.


:D That works ¡¡¡

The correct sentece is :

cl /O1 exdll.c /LD /link kernel32.lib user32.lib

And creates a exdll.dll with 40kb. Is a normal size?

Thanks


No, it's way too big. Use the extra command line options I mentioned above.


This works¡¡¡

cl /O1 exdll.c /LD /link kernel32.lib user32.lib /
OPT:NOWIN98 /NODEFAULTLIB /ENTRY:DllMain


And now have only 3kb¡¡¡

Thanks a lot


This works¡¡¡

And now have only 3kb¡¡¡

cl /O1 exdll.c /LD /link kernel32.lib user32.lib /
OPT:NOWIN98 /NODEFAULTLIB /ENTRY:DllMain


Thanks a lot


I also recomment C::B is an IDE for the Toolkit and is Open Source ;)

I'm testing it know and seems to working OK :up:


I also recomment C::B is an IDE for the Toolkit and is Open Source
I use Eclipse vith the toolkit but i have not a debugger.
What about with C::B ?

Yes ;)


plugins for Windows and Linux
  Hello

I know that the NSIS is port to Linux and BSD (I think).
Are there recomendations when we do plugins for that these can be useful on Windows or Linux machines ?

Best Regards


For your understanding, you can make ,as in produce, a WINDOWS installer (SETUP.EXE) via makensis on a POSIX system, e.g. Linux.

This is very handy if you do a nightly build of a Windows Installer on a POSIX system.

So, NSIS is NOT used for creating runnable installers which target the Linux client PC.

For a working makensis on Linux, see screenshots on Suse 9.3.

Yes, if you look closly the finished build installer runs, but under WINE, that's why ;)


Thanks