DOS GNU C C++ applications and programming environment

djgpp, djgpp compiler, gnu c




makefile………..

Hi

thanks for the answer :-)

the makefile I have is very complicated if I wanted to add
something say a file file1.cpp what do I add ?

the file1.o and .exe & .cpp ??

I am currently trying to add this file to the make file given
it is a makefile with no extension I open it in notepad and save it.. any
changes doesn’t affect the make.exe it still gives the same output i.e.
error undefined referencene to main.

since file1.cpp I want to make it to main
and say file.c as a link file.

if you can help then highly appreciated

thanks again

rgrds

Jazz

- — -

—– Original Message —–
From: "DJ Delorie" <d…@delorie.com>
Newsgroups: comp.os.msdos.djgpp
To: <dj…@delorie.com>
Sent: Thursday, December 13, 2001 6:39 PM
Subject: Re: Makefile

> > does anyone know how to recompile the make.exe
> > after one have added things to the makefile??

> You should never need to rebuild make.exe, no matter what you do to
> your Makefiles.

> Unless, of course, you’re changing the Makefile in the sources for
> make itself, but if that were the case, you wouldn’t have needed to
> ask your question because the answer would be obvious ;-)

No Comments

Profiling application

Hi, everybody!

I am trying to profile my application (compiled with DJGPP v.2.03, gcc
v.2.95.3, binutils v.2.10). I have compiled it with -pg and -a switches and
ran. It produces a file bb.out (BTW, DJGPP FAQ talks about gmon.out, do I
have to rename it afterwards?) with some statistics.
Now, every time I try to run my profiler (gprof app.exe bb.out) it exits
with a message: "d:/djgpp/bin/gprof.exe: Cannot allocate 1087817412 bytes"
How do I get around this?

Any help would be highly appreciated.

Thanks,
Alex

Comment (1)

Compiling problem

Hi

I’m compiling with gcc 3.0.2. With the following command line I get 17
undeclared functions in std_cmath.h. Any advice?

— cut —-
gcc -ansi -pedantic -Wall -W -O2 -c Tulo.cc
In file included from c:/djgpp/lang/cxx-v3/cmath:31,
                 from Tulo.cc:4:
c:/djgpp/lang/cxx-v3/bits/std_cmath.h: In function `float std::acos(float)’:
c:/djgpp/lang/cxx-v3/bits/std_cmath.h:95: `::acosf’ undeclared (first use
this
   function)
— cut —-

Ari-Matti

No Comments

Compiling problem (cmath)

Hi

I’m compiling with gcc 3.0.2. With the following command line I get 17
undeclared functions in std_cmath.h. Any advice?

— cut —-
gcc -ansi -pedantic -Wall -W -O2 -c Tulo.cc
In file included from c:/djgpp/lang/cxx-v3/cmath:31,
                 from Tulo.cc:4:
c:/djgpp/lang/cxx-v3/bits/std_cmath.h: In function `float std::acos(float)’:
c:/djgpp/lang/cxx-v3/bits/std_cmath.h:95: `::acosf’ undeclared (first use
this
   function)
— cut —-

Ari-Matti

Comments (3)

sound(frequency,duration) function?

Hello, is there a function that you can call in which you tell it the
frequency and the duration, and the program can still keep executing while
the sound is playing, then the sound will turn off once the duration stops?

I am aware of sound(), sleep(), and nosound(), but the sleep() will
completely stop the whole program, and I don’t want that.

Thanks,

Derek Young

Comment (1)

strings

I can’t seem to get strings to work with DJGPP. I’m sure there’s a simple
solution. Could someone please point me in the right direction?

Here’s what I tried:

#include <iostream>
#include <string.h>

int main()
{
    string word = "test";
    cout << word << endl;
    return 0;

}

When I compile it, I get:

Error: ‘string’ undeclared (first use this function)

I tried many things and nothing worked. This is mind boggling. Would you
mind pointing out what I’m doing wrong?

Thanks,

Derek

Comment (1)

Need A Stack for DOS…anyone know of one

Need a TCP stack for DOS, anyone know, or recomend one?

Comments (3)

Makefile Tip

Please reply also directly to me, thanks

Hello All,

I think it’s quite basic, but have a look!

I’ve got the following problem: i have different sourcefiles in different
subdirectories, i want to compile them and add them to an archive but i
want all object files to be created in a single object directory.
My makefile-attempt looks like this:

###
OBJPATH = ./obj/
DEVPATH = ./dev/
HLPPATH = ./helper/
SNDPATH = ./sound/
OBJECTS = blaster.o pic.o pit.o wrapper.o irq.o stdhlp.o\
           soundsys.o

CFLAGS  =
CC      = gcc

### Test Lib to be created
alpha.a : $(OBJPATH)$(OBJECTS)
        ar -rvs alpha.a $(OBJPATH)$(OBJECTS)

$(OBJPATH)%.o : %.c
        $(CC) $(CFLAGS) -c $< -o $@
###

It is clear to me that this can’t work the dependency of the last rule
would need to have the correct pathes set, this would mean that i have to
rewrite the rule for every subdirectory, but there should be a more clever
way of doing this.
Can i use macros or do you have any other ideas how to do this?

Many thanks in advance,
Martin

Comments (2)

Hello. I need help with GCC…

I have been trying to make GCC work for me. I looked in the frequently
asked questions and a few other things but I can’t seem to find my problem.
Each time I try to open GCC, it opens but it says:
gcc.exe: No Input Files
And then it wont let me do anything else. I’m thinking that I have to
download something more. I do have as.exe and I do have ld.exe . Could you
please tell me how to fix this problem? I would really appreciate it. I
also have one more question. GCC is for compiling and linking right? I
would also appreciate it if you would tell me that too.
Thank You Very Much!
       -Sincerely, E.M.

_____________________________________________
Free email with personality! Over 200 domains!
http://www.MyOwnEmail.com

Comments (2)

help – export

Sorry for emailing, but I realy need help, and nobody on any
DJGPP/C/GCC group didn’t helped me…

My problem is with external templates.
I have :
  array.h  declaration of template class cArray (only constructior,
    and i.e.   int length();
  array.cpp definition of cArray
  test.cpp, game.cpp, etc.. code that is using : cArray<int>,
  cArray<float>, but also cArray<my_own_class_from_game_cpp>
all this in one project ofcourse

I readed FAQ, manual – and stil nothing, only work around that worked
is to declare each instanization of template that I would like o use
(like cArray<int>) but this isn’t imho good :-(
I was waiting for quite long time for GCC 3, because external
templates are one of basic things needed for my project, and nothing
:(

Please – help me – maybe little example with explanation how to
configure CXX-flags etc under RHIDE…

I will be _realy_ greatfull for help :)
If You can – i’m waiting for this answare – I can’t continue my
program until solving this problem, or – workaround, but I realy don’t
want to re-build each time whole array.cpp – because my project will
have about 50,000 lines (in final version) so rebuilding external
templates each time will be very uncomfortable


Best regards,
‘Raf256′
mailto:raf…@go2.pl

Comments (9)