I am using following simple code from here:
program LazMessage;
uses
Dialogs;
begin
ShowMessage('This is a message from Lazarus');
end.
However, it is giving following error:
fpc gui_showmsg.pas
Free Pascal Compiler version 3.0.0+dfsg-11+deb9u1 [2017/06/10] for x86_64
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling gui_showmsg.pas
gui_showmsg.pas(6,3) Error: Identifier not found "ShowMessage"
gui_showmsg.pas(9) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
Adding {$mode delphi} or {$mode objfpc} does not make any difference.
Where is the problem and how can it be solved?
Unfortunately, ShowMessage is for Lazarus and not FreePascal. So, you cannot use it in FreePascal.
Related
Looking at the source setting CMAKE_ASM_NASM_OBJECT_FORMAT should be sufficient, however this does not seem to be the case.
I expected the following to create a valid build configuration for a macOS application using the macho64 file format.
project(hello_world ASM_NASM)
set(CMAKE_ASM_NASM_OBJECT_FORMAT macho64)
add_executable(hello_world source/main.asm)
However, when running make with VERBOSE=1
/usr/local/bin/nasm -f macho -o CMakeFiles/main.dir/source/main.asm.o /hello-world/source/main.asm
/hello-world/source/main.asm:6: error: instruction not supported in 32-bit mode
/hello-world/source/main.asm:7: error: instruction not supported in 32-bit mode
/hello-world/source/main.asm:8: error: instruction not supported in 32-bit mode
/hello-world/source/main.asm:9: error: instruction not supported in 32-bit mode
/hello-world/source/main.asm:12: error: instruction not supported in 32-bit mode
/hello-world/source/main.asm:13: error: instruction not supported in 32-bit mode
make[2]: *** [CMakeFiles/main.dir/source/main.asm.o] Error 1
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2
We can clearly see the 32 bit version of mach-o is passed to the format flag instead of the expected 64 bit version: macho64.
Versions
CMake 3.12.2
NASM 2.13.03
macOS 10.14
The compiler is checked at the project() call.
You need to move setting the CMAKE_ASM_NASM_OBJECT_FORMAT variable before that call.
I am trying to install vmware 8 on kubuntu bionic with gcc-7.3. The installation process went well until the message "gcc is not found". gcc is there but I guess vmware 8 is too old and does not recognize gcc version 7.3.
I have tried to manually compiled the modules (vmmon and stuff) but an error came out. An example is shown below.
/usr/lib/vmware/modules/source/vmmon-only/linux/driver.c: At top level:
/usr/lib/vmware/modules/source/vmmon-only/linux/driver.c:175:19: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.fault = LinuxDriverFault
^~~~~~~~~~~~~~~~
/usr/lib/vmware/modules/source/vmmon-only/linux/driver.c:175:19: note: (near initialization for ‘vmuser_mops.fault’)
/usr/lib/vmware/modules/source/vmmon-only/linux/driver.c: In function ‘init_module’:
/usr/lib/vmware/modules/source/vmmon-only/linux/driver.c:346:4: error: implicit declaration of function ‘init_timer’; did you mean ‘init_timers’? [-Werror=implicit-function-declaration]
init_timer(&linuxState.pollTimer);
^~~~~~~~~~
init_timers
Is there a workaround?
Many thanks
I have been receiving a strange error when trying to import external libraries/packages in Go when running any go get command I get the forllowing error
# github.com/mattn/go-sqlite3
cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
I have tried updating mingw
mingw-get update
but I still get the same error, what can I do to fix this issue?
Thanks
I came across this error when I tried to compile a project that used xerces-c library(binaries). Since this is a binary it does not come with ./configure and hence I skipped doing the same(./configure). I am providing the xerces-c files as include and library to my xml reading program as anyone would normally do. The only error left is as below...
--Error output ---
Building target: MyXmlProject.exe
Invoking: Cygwin C++ Linker
g++ -L"C:\cppLib\xerces-c-3.1.1-x86_64-linux-gcc-3.4\lib" -o "MyXmlProject.exe" ./xmldom/XmlDomDocument.o ./xmldom/main.o -lxerces-c
collect2: error: ld terminated with signal 11 [Segmentation fault], core dumped
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: BFD (GNU Binutils) 2.25 assertion fail /cygdrive/i/szsz/tmpp/cygwin64/binutils/binutils-2.25-1.x86_64/src/binutils-gdb/bfd/cofflink.c:264
makefile:48: recipe for target 'MyXmlProject.exe' failed
make: *** [MyXmlProject.exe] Error 1
I had downloaded the binaries from http://archive.apache.org/dist/xerces/c/3/binaries/ I have tried with a. xerces-c-3.1.1-x86_64-linux-gcc-3.4 and b. xerces-c-3.1.1-x86-linux-gcc-3.4 both the files but both result in same error.
Seems that the above two binaries are compiled for different platform and do not work on windows. The environment I am using is eclipse, cygwin64 on windows8.1. Can someone tell me which binary should I take so that the error is resolved?
The other options are tedious and wanted to avoid those. People who wants to know how I came across this error and other options please refer to How to resolve "relocation truncated to fit: R_X86_64_PC32 against undefined symbol `xercesc_3_1::AbstractDOMParser::adoptDocument()'"
While trying to compile this program with an up-to-date compiler: https://github.com/AndrejMitrovic/DWinProgramming/blob/master/Samples/Chap03/HelloWin/HelloWin.d
I get this linker error: Error 42: Symbol Undefined _D5win327winuser13CreateWindowWFPxuPxukiiiiPvPvPvPvZPv
That's a mangled name, so the problem isn't the Windows libraries themselves... my guess is the dmd_win32.lib file from here https://github.com/AndrejMitrovic/DWinProgramming is needed too.
Try downloading that and adding it to your compile command line. dmd Hellowin.d dmd_win32.lib