coronalabs / submodule-platform-linux

Linux platform implementation. This is submodule of Corona repository.
6 stars 3 forks source link

Linux Code update #11

Closed rcraig12 closed 4 years ago

rcraig12 commented 4 years ago

Addition of New Project functionality including the code to create Corona SDK projects based on the selection made by the user whilst making a new project.

Shchvova commented 4 years ago

When I'm trying to build it fails with linker error:

/build/platform/linux/../../platform/linux/Rtt_LinuxContext.cpp:1297: undefined reference to `Rtt::NewProjectDialog::NewProjectDialog(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long)'
./Simulator/Rtt_LinuxContext.cpp.o: In function `__static_initialization_and_destruction_0(int, int)':
/build/platform/linux/../../platform/linux/Rtt_LinuxContext.cpp:90: undefined reference to `Rtt::LinuxConfiguration::LinuxConfiguration()'
collect2: error: ld returned 1 exit status
Shchvova commented 4 years ago

Btw, it builds inside docker container, I test it with following:

docker run --rm -it -v $(pwd):/src  --entrypoint /bin/bash  coronalabs/linux_builder_rpi

This will start bash inside the docker container, mounting current directory to /src. Then you can copy it somewhere and start script ./build_native_linux.sh from ./platform/linux.

Error above is seemingly linker error, which happens when some new source (.cpp) file is not included into the make files.

rcraig12 commented 4 years ago

Hi Vlad the LinuxConfiguration class has been removed as it was experimental. The code should build normally now :)

Shchvova commented 4 years ago

Still an error.

/builder/platform/linux/../../platform/linux/Rtt_LinuxContext.cpp:1290: undefined reference to `Rtt::NewProjectDialog::NewProjectDialog(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long)'
collect2: error: ld returned 1 exit status

By the way, I made an instruction how to test build in close-to-live environment:

# first, cd into the sourced directory, for example
cd ~/Projects/corona
rm -f ../solarSrc.tgz && COPYFILE_DISABLE=true tar -cf ../solarSrc.tgz --exclude="*.hg*" --exclude "*.git*"  ./*
cd ..
docker run --workdir /builder --rm -it -v "$(pwd)":/src --entrypoint /bin/bash  coronalabs/linux_builder_rpi
# at this point commands are executed within the container, prompto would look something like root@26582c700319:/builder#
tar -xf /src/solarSrc.tgz
cd platform/linux
./build_native_linux.sh && echo Success || echo Failure
# last command would start an actual build process
# when build is done, you can copy results from container into /src
# To finish, press Ctrl+D or type `exit`
rcraig12 commented 4 years ago

How are you building this? It compiles completely fine in Codelite IDE. There must be something I am missing...

Shchvova commented 4 years ago

Hey. I merged upstream to your PR so it doesn't have conflicts anymore. I had to manually add a file to the project, so it builds (Rtt_HTTPClientLinux.cpp) but I still get errors trying to build, it is the same error

./Simulator/Rtt_LinuxContext.cpp.o: In function `MyFrame::OnNewProject(wxCommandEvent&)':
/builder/platform/linux/../../platform/linux/Rtt_LinuxContext.cpp:1290: undefined reference to `Rtt::NewProjectDialog::NewProjectDialog(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long)'
collect2: error: ld returned 1 exit status
linux_rtt_simulator.mk:158: recipe for target 'Simulator/linux_rtt' failed

I wonder if it's my doing or not :/ EDIT: looking at it, it is actually different error, of the same kind.