|
Hi Sebastian,
Just watch out, some C compilers don't like the // comments.
regards,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
Hi,
First check that you are compiling both files. And if you are, make sure that you are compiling them in C mode.
a.c:
#include "b.h"
int main (int, char**)
{
MyFunction ();
return 0;
}
b.h:
#ifndef __B_H__
#define __B_H__
void MyFunction (void);
#endif /* __B_H__ */
b.c:
#include "b.h"
void MyFunction (void)
{
}
Hope this helps,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
RichardS wrote: First check that you are compiling both files. And if you are, make sure that you are compiling them in C mode.
How do i do this sir? Actually I am using Turbo C. I know i have to use the command line compiler (tcc.exe) for this, i do not know how to compile these files altogether. I want an object file of b.c and the functionality in that. Please help me.
Regards,
Aljechin
|
|
|
|
|
Unfortunately I used Turbo C very long time ago, just after Hannibal crossed the Alps. If you are using tcc.exe, I would then assume that the files are being compiled into C. The next thing to check is if you are getting object files a.o (or a.obj) and b.o (or b.obj). If you are not, you are not compiling both files. If you are, then check that you are linking all the objects together.
regards,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
RichardS wrote: If you are, then check that you are linking all the objects together.
Sir, I have both the object files, a.obj and b.obj. How do I link them together? Please help me.
Regards,
Aljechin Alexander.
|
|
|
|
|
Umm, your first post said:
Aljechin It compiles, but when I try to make the .exe file, I get an error called Undefined symbo, _MyFunction.
How where you making a .exe?
By making a .exe file, you are linking the code.
regards,
Rich
p.s. It might help to see the command lines that you are using.
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
Sir, I said I *tried* to make an exe file. I get this error when I tried to make the exe. Before making the exe itself the error comes from the linker. Its actually for the exact command for which I am looking, i think. Can you please tell me that? I think its something like
tcc a.c, a.obj b.obj
Aljechin Alexander.
|
|
|
|
|
Ok. I think what you have done is slightly incorrect. With that command, tcc will create the a.obj and b.obj but the obj's will be identical (i.e. it will compile a.c into both a.obj and b.obj).
Try:
tcc a.c a.obj for a.c and:
tcc b.c b.obj for b.c.
Now to link there should be a TLINK.exe? Try:
tlink a.obj b.obj
regards,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
Unfortunately I do not have Turbo C compiler right now, but I know there is the concept of Project in it.
You must have both the files compiled separately (Alt+F9).
In the Project menu->Open Project Then give it a name like asd.prj . Then add both the .obj files separately into it using the INS key(maybe).Then in the end, press F9, and the .exe is made.
Of course you need to add the declaration of the function in the main file, as mentioned in the comments above.
Hope that helps.
this is this.
|
|
|
|
|
Hello,
I am using a CTreeCtrl Object with CImageList Object associated to it in a SDI based MFC Application. CImageList Object consists of 2 pictures, one is a Closed folder picture and other is a Open folder picture. In my Application, CTreeCtrl Object should have one main item(Tests) and 3 subitems(Test1, Test2 & Test3) in it.
My problems are:
1. I want to add check boxes only to subitems(Test1, Test2 & Test3). CTreeCtrl Object adds check box to main item(Tests) also.
2. If I double click on main item(Tests), I want to change picture associated with it depending on whether item is collapsed or expanded.
3. If I click on subitem(Test1 ot Test2 or Test3), the pic associated with main item also changes.
How to solve these?
Regards,
mysticlol
|
|
|
|
|
|
hi all
i know that the bitmap are saved in hard disk in reverse format
(opposite to the displayed format).i had shown it on the picturebox and got the hbitmap handler will the handler be in reverse order or normal as displayed on the picturebox.
ddd
-- modified at 4:48 Friday 17th March, 2006
|
|
|
|
|
tasleem143 wrote: got the hbitmap handler will the handler be in reverse order or normal as displayed on the picturebox.
it format is same as displayed on picture box.. have a try man
|
|
|
|
|
thanks i tried it is same as displayed on the picturebox not reversed.
ddd
|
|
|
|
|
Porting an MFC app from VS6 to VS2005 gives a CTime problem:
we have binary historic files in which CTime is stored as 4 bytes, in VS2005 CTime is 8 bytes.
I need to convert a 64bit CTime to 32bit CTime and vice versa.
OR i need a 32bit CTime object.
I now get errors like 'cannot convert from ATL::CTime to __time32_t or long etc.
Ronald
|
|
|
|
|
I have to write a module in VC++ 6.0 that will do the foll:-
Launch Icons from the system tray and log the pass or fail result.
Kindly suggest me how i need to go ahead to enumerate all icons present in the System Tray and launch each of them, one after the other.
launching may be in amy order.
A reply at the earliest will be very helpful as i need to finish this within 4 days.
Thanks in advance.
Sincerely
Giftsana
|
|
|
|
|
|
Thanks for the response.
I went to that site earlier and customized it as per my module specs.
It works!
This is a good sample and i appreciate the samples in codeproject as they are very helpful.
Thanks
Giftsana
|
|
|
|
|
Please view the message here!My trouble here[^]
Tomorrow may not exciting, but the exciting tomorrow certainly will come.
|
|
|
|
|
why don't you ask it in the article message board (at the bottom of the article) ?
|
|
|
|
|
Hello everybody,
For my project I need to record some data from the wave audio inut device.
To do this I have created a class CWaveIn wich simply encapsulate the standard windows calls waveInOpen() waveInClose() waveInAddBuffer() etc...
When I open the wave audio input device I use the WAVE_MAPPER flag. I use a dedicated thread to process the driver messages. I only process the WIM_DATA driver messages. The dedicated thread calls a user defined callback function to store the signal to disk and do some computations on the data. These computations are CPU expensive so it is possible that at some point in time there are more than one WIM_DATA messages on the message queue of the dedicated thread.
In my project I need to mark the first and the last waveheader in a serie of waveheaders with a start and stop time respectivly. Oke to mark the first waveheader is easy just simply set a flag when the user presses the start button and clear the flag in the callback function. But to mark the last waveheader is a lot more complicated. I use the waveInGetPosition() function directly after the user stopped the wave audio input device. (All waveheaders are of the same size) Devide this number by the size of the waveheaders and voila you have got the last waveheader. (Since recording started)
Oke this works perfectly for large waveheaders. (0.1 seconds and bigger) But when I use small waveheaders I lose one WIM_DATA message in a series of WIM_DATA messages? The current position (waveinGetPosition) is one wavheader ahead of the number of waveheaders I ve received from the device driver.
Thank you
|
|
|
|
|
Hi Dear,
I am building my application in visual studio 6.0 however I am getting the following error. Can you please help me resolve this.
BSCMAKE: error BK1503 : cannot write to file 'TouchDbg/test.bsc'
Thanks
-- modified at 2:38 Friday 17th March, 2006
|
|
|
|
|
Close and start again. Or click on clean.
Nibu thomas
Software Developer
|
|
|
|
|
I have tried to clean and than rebuild all however error is still coming.
|
|
|
|
|
Close VS and delete the bsc file.
Nibu thomas
Software Developer
|
|
|
|