In Delphi 2009, how can I build a project using command line. I tried using the command line compiler and supplying -a -u -i -r in dcc32.cfg file. But compiler is not recognizing the paths and throwing the error required package xyzPack is not found.
-aWinTypes=Windows;WinProcs=Windows;DbiProcs=BDE;DbiTypes=BDE;DbiErrs=BDE
-u"C:\MyProj\Output\DCP"
-i"C:\MyProj\Output\DCP"
-r"C:\MyProj\Output\DCP"
and on command line i execute the command :
dcc32 "C:\MyProj\MyProject.dpr" -B -E"c:\MyProj\Output\EXE"
What am I doing wrong here?
Thanks & Regards,
Pavan.
Instead of invoking the compiler directly, consider using MSBuild on your .dproj, since that's what the IDE uses. Delphi MSBuild Build Configurations From Command Line might help you with that.
From the related answer (as shown below) ie:
Compiling with Delphi 2009 from a command line under Windows Vista 64-bit
I notice that you should be able to build a single package from the command line this way. I have used batch files (buildall.cmd) to launch dcc32, and have not yet used msbuild.
I have ultimately found both approaches frustrating, and have instead decided to opt for building a little GUI shell (a lite version of Final Builder, if you like) that basically works as a semi-graphical semi-command-line way of automating my builds and filtering the compiler output to produce results. I would be highly interested in anyone else's experiences with "tinder box" (daily or even continuous build) operations with Delphi.
You may end up where I'm heading... just buy Final Builder. :-)
Related
So, I am working on an embedded project for a cortex m7 microcontroller (ATSAME70Q21). The code is written in Atmel Studio 7, but I want to build it in a Debian environment through Docker (gcc docker image is Debian-buster based if I'm not mistaken) so that I can work in a Continuous Integration workflow.
At the moment I am trying to manually construct a Makefile, based on the generated makefile by the IDE, but that seems like the wrong way to handle this problem. Maybe I am too tunnel-visioned to notice different solutions. So I would like some help from folks who maybe have struggled with this problem before.
Thanks in advance.
I solved this problem the following way by mimicking the output of Atmelstudio into a CMakeLists file.
First I analyzed the generated makefile from the debug build to discover what files were built, what compiler flags were used and what programs were called.
Then I compared the generated makefile from the release build with the debug build to discover the differences.
With this information, I made a CMake file. For now, I GLOB_RECURSE all my source files, but I could crawl the Atmelstudio *.cproj file to find out what files are required.
This might not be the ideal answer, but it solves my problem.
Is it possible to use Erlang with ZMQ on Windows? I have tried to use erlzmq2, but rebar fails to compile it with cryptic linker errors. Of course i can invest some time and investigate makefiles, but maybe other way exists?
Update
Whose who are interested in compilation errors can download latest erlang for windows and try to build erlzmq2 (Visual Studio 2012 compiler, msys sh and make). Error looks like:
cl : Command line error D8021 : invalid numeric argument '/Wl,-DLL,-IMPLIB:.libs
\zmq.dll.lib'
Makefile:541: recipe for target 'libzmq.la' failed
make[3]: *** [libzmq.la] Error 2
Please note that other erlang libs are compiling with this setup without any problems.
Your problem lies in compiling ZeroMQ for Windows. You haven't actually gotten to any Erlang yet. Here are some of the clues that tell you this:
Makefile:541: recipe for target 'libzmq.la' failed
This line says there's a problem on line 541 of the Makefile. But in erlzmq2, you can see that neither the main Makefile nor the c_src Makefile (which is what would build libzmq.la) has anything close to that many lines.
make3: * [libzmq.la] Error 2
The [3] means that you're 3 invocations deep into Make. Specifically, you started at the top-level Makefile, which called Rebar, which ran make -C c_src, which downloads ZeroMQ version 3.2.2 and tries to do a ./configure && make
To fix this Unix-style, go into the deps directory of erlzmq2 and figure out how to correctly compile ZeroMQ. Hopefully, you will just need to pass some arguments to configure. Then you can edit c_src/Makefile and set ZMQ_FLAGS to whatever you had to do for configure, clean, and make.
To fix it more Windows-style, follow the Windows build instructions for ZeroMQ. Put the compiled libzmq under deps and just edit the c_src Makefile to a no-op.
Finally, if you don't actually need to run this code on Windows, but are just using Windows as your development environment, I think you'll have the easiest time by running the build inside a Linux VM (not a hard thing at all with tools like Vagrant). Sorry, but Unix is the real system for this stuff; Windows support is an afterthought.
I am trying to build a delphi project from the command line compiler
Example: C:\dcc32 -B C:\BD\Delphi7\work\MyProject.dpr
Aside from the the standard evironment pathing:
$(DELPHI)\Bin;
$(DELPHI)\Lib;
$(DELPHI)\Imports;
$(DELPHI)\Projects\Bpl;
$(DELPHI)\Rave5\Lib;
there is nearly 50 other paths to other libraries, components, etc...
How do i package this all up and point to these to use in the commanline parameters to make my build?
When i run the example above
C:\dcc32 -B C:\BD\Delphi7\work\MyProject.dpr
i get a FATAL: File not found : 'file name here'
thanks
Under Delphi 7 you need to edit you dcc32.cfg file (in you Delphi bin folder). You need to copy the library path from the IDE and put in the dcc32.cfg file. You have to add it 4 times for the different command line parameters, eg:
-u=path
-i=path
-r=path
-o=path
There are 4, I believe. I haven't done this in a few years so I hope that the info is correct. Certainly, the command line compiler does not use the same place to store the paths as the IDE does.
I don't think dcc32.exe is stored under C:\, if it is you're installation of Delphi is really out of order, or you have moved only the dcc32.exe file.
It's advised to use the dcc32.exe from the directory where the Delphi install has stored it. The Delphi directory depends strongly on the Delphi version, but for Delphi versions op to 7, this looked something like this:
C:\Program Files\Borland\Delphi7\bin\dcc32.exe
For later versions of Delphi, this should be changed to:
"C:\Program Files (x86)\Embarcadero\RAD Studio\8.0\bin\DCC32.exe" -h
When using dcc32 against the .dpr file it produces a dll but no dcu’s.
The project level .cfg is using the –N switch to set the path but nothing is in the directory specified. It must see the .cfg as the –E switch is working.
I tried to use brcc32/brc32 against the .dpr file before a call dcc32 but either one gives me the Error projectName.dpr 3 1: Expecting END?
I need the dcu’s from project1 for project2 which when I run the dcc32 against the .dpr it errors stating it can’t find the missing dcu’s from project1 for project2.
What steps, clc/utility need to be run to produce the dcu files?
Running on XP with Delphi 6 installed.
DCC32 v14
BRC32 v5.4
Perhaps it is ignoring the -N switch because it doesn't have one? As far as I know the switch to specify where the dcu's should go is the -N0 switch. (Letter N, digit zero).
dcc32 --help is your friend here. In particular:
-N0<path> = unit .dcu output directory
(Note that D6 does not show this switch. D7 and more recent versions do.)
You do have to make sure that you include all necessary unit dependencies through the -U flag, resource dependencies through the -R flag, and so on. For instance:
dcc32 -B -CC -Q -E.\bin -IC:\home\work\Indy;C:\home\work\dUnit\src -LE.\bin -N0.\build -O"C:\home\work\Indy;C:\home\work\dUnit\src" -U"C:\home\work\Indy;C:\home\work\dUnit\src" -R"C:\Program Files\Borland\Delphi6\source\Indy;C:\Program Files\Borland\Delphi6\lib" SIP.dpr
EDIT: It doesn't help that dcc32 --help does NOT tell you about the -N0 switch. I found this out the hard way, and it was only on the advice of my boss (Guido Gybels) that I managed to get things working.
I installed a copy of f# on my machine (on a secondary drive), and when i try to start the F# interactive prompt, it says it could not find fsi.exe. Do i need to copy some files somewhere or something?
You could try to look here:
"%ProgramFiles(x86)%\Microsoft SDKs\F#\<fsharp_version>\Framework\<dotnet_version>\Fsi.exe"
With the VS 15.8 update it appears to have been moved. I found it in:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\FSharp\fsi.exe
Could you be more specific with your repro steps? I assume you are using the latest, May 2009 CTP? Also, when you say 'start the F# Interactive prompt' are you talking about launching it from the start menu?
On most machines it will be exactly:
"C:\Program Files (x86)\FSharp-1.9.7.4\bin\fsi.exe"
If you did something non-standard it could just be a bug in the installer. E.g., did you override the Program Files folder for your F# installation by passing in a command line parameter to msiexec?
Do a quick search for fsi.exe on your machine (the console F# interactive window) and point your shortcut there.