Lefora Free Forum
9 views

Setting Up Your Custom C/c++ Build., Setting the executable icon, and linking through batch.

Page 1
posts 1–2 of 2
rookie - member
4 posts

Many times I've heard people asking the question, that they can't include an external library (libwsock32.a etc.) without creating a project in dev - c++. Setting the executable icon, how do I do it, without dev. Well, I'm gonna tell you how...

Through a batch file..

If you don't like dev c++, and are used of something like TextPad, then you can still have your icon changed, and link libraries:

Create a new batch file, and put in the following commands:

CODE
@echo off
echo Building project....
make.exe -f "Makefile.win" all
exit

For this to work, have the lib.a in the same directory as the source. The icon you want, and the following files:

CODE
MakeFile.win
test.res
test.rc

So, all these files should be in your project folder:

CODE
buildProject.bat
test.cpp
icon.ico
MakeFile.win
test.res
test.rc
any other necessary libs..

Create a project in dev c++, and steal all the shit from that, the .res file, and the .rc file. And change the necessary names to match your project. The most important part is the MakeFile.win, that's what'll be doing all the work. So make sure everythings okay there. Now you can use any text editor you like, and still have your .lib files linked and your executable icon attactched.

And that 's it, once all those files are there, run the batch file and the executable will be made with your custom icon, and whatever lib.a files you included.

You're probably thinking at this stage, I dont know where to start, no worries. I'm such a nice guy I included a zip file, for a template example. So just mod it for your own us

rookie - member
4 posts

sorry i have missed the file will attach soon

Page 1
posts 1–2 of 2

This Topic Is Locked To Guest Posts

It's been a while since this topic was active, if you'd like to get it going again, please post as a registered member

join now