Compiling more than one source file

Hello everyone, :smiley:

How can I create a project with 2 or 3 source files and compile then ? :open_mouth:

Have you ever tried something like this, using Open AT ???

Tks for all,
Gus

Guys,

I am still trying to compile more than one source file. :confused:

I added a new source file in the directory /src and, using Open AT Project Wizard, I reopened the project.

When I tried to compile I got the following error

make: *** No rule to make target `funcoes.o', needed by `gcc_SourcesV1_32'.  Stop.

funcoes.o is the new source file
SourcesV1 is the project name

Any ideias :question: :bulb:

Hello,

You should check your make file manually. The important part for us is located in the main directory of your project, with name like ā€œyour_project.makā€ .

Look at the SRC_C_LIST, it should look like this with the files to compile:

#------------------------------------------------------------------------------
#   List of source files of the library or executable to generate
#------------------------------------------------------------------------------
SRC_C_LIST =  \
appli.c \
gprs.c \
riaszt.c \
t_at.c \
sms.c \
system.c \
time.c \
gps.c \
ei_ftp.c \
compress.c \

Make sure that your files are really in the src sub-directory.

And the include files should be in the itf or inc directory with this settings:

#------------------------------------------------------------------------------

Path for include C files

#------------------------------------------------------------------------------
PATH_H =
ā€¦/ā€¦/inc
ā€¦/ā€¦/itf \

In visual C++ use ā€œaddā€“>add existing itimā€ on your rte project.

good luck,

tomalex

Hello everyone,

If you are using cygwin and adds a new soruce/s file/s to your .mak file or .scs file (this modifies the .mak file automatically).

You have to rebuild dependencies file with:

wmmake youproject -c

-c (Cleans all dependencies tree)

This command modifies the gcc/out/yourfileproject_B.dep file introducing how must be compiled your new sources

You can modify the .dep file manually but I thin the best process is

  • To modify .scs file and make wmmake youproject -c . This rebuild also the Visual C++ project file

I hope this advice can help you.
Regards,

Javier

It is working !!! :stuck_out_tongue:

Tks for all,

Gus

Hello,

i have a similar problemā€¦ I would like to create a tree in my project under Eclipse. So, under Eclipse, i create a new src folder (named ā€œuart1ā€), which contains a file ā€œal_uart1.cā€ (also created under Eclipse IDE).

When i compile, i have the following error :

[color=green]make: *** [make_single_bin] Error 1
d:/Programmes/Wavecom-OpenAT/WorkSpace/Telem/mingw/out/appli.c:85: undefined reference to `AL_UART1_SystemOutā€™
Done.
Updating RTE kernel fileā€¦
no generated DLL foundā€¦
[wmmake error #1] Build error.

The function AL_UART1_SystemOut contained in al_uart1.c is not found.
So, as described above, i modified the file *.scs in my project path directory. I add the following lines :

[color=darkred]
./src
./Telem/uart1

appli.c al_uart1.c

After that, my program compiles without any problems. But, Next time i open the project thanks to Project Wizard, the file *.scs has lost the previous informations ā€¦ the project Wizard has cleared itā€¦ So i must to re-write itā€¦

Why these informations are lost ? how can i save it ?

Best regards