Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests.vcxproj fail to compile #12

Open
tuyen-le opened this issue Aug 18, 2019 · 7 comments
Open

Tests.vcxproj fail to compile #12

tuyen-le opened this issue Aug 18, 2019 · 7 comments

Comments

@tuyen-le
Copy link

Dear Mr. Baranov,

I am a beginner with C++ and Visual studio.

I am trying to do a random closest packing for the metal particles in FDTD simulation with PML condition.

I used Visual Studio Software to run the file PackingGeneration.sln file from your package.

I compiled "Execution" and "PackingGeneration" successfully, but I got a problem with compiling "Tests.vcxproj" in Test folder.

It showed up error LNK2019, LNK2001, LNK1120,
failed to compile Tests.vcxproj (attached file)

Could use please help me to overcome these errors?

Thank you very much!
Le

Tests

@tuyen-le
Copy link
Author

I tried to debug it for 2 weeks but failed every time at the end.
I searched for some solutions on Google to deal with these errors but not helped.

Hope you can help!

@tuyen-le
Copy link
Author

I used Win32 or X64 to debug but not successful.
I tried to run with DEC C++ but it also not succeed.

@tuyen-le
Copy link
Author

I am running the program on Window10 X64.

Thanks!

@VasiliBaranov
Copy link
Owner

Hi Le,

"Tests" is not essential for running the program, this project contains only some test functions that check if the code works as expected. You can just do right mouse click on the Tests project in Visual Studio and click "Unload project" and then compile.

You might also need to do right click on the PackingGeneration project and select "Set as startup project".

Though it's a little strange that it doesn't compile, but unloading the Tests project is definitely the quickest solution.

Best,
Vasili

@tuyen-le
Copy link
Author

Dear Mr. Baranov,

Thank you for your quick reply!

Follow your instruction, I had compiled the PackingGeneration.sln successfully without Tests .

I change some necessary variables in "generation.conf" before compiling .sln
count:9000
sued: 331

The execution file PackingGeneration.exe is located in folder Debug/

I got a new problem that running PackingGeneration.exe showed nothing as the attached file.

  1. Did I compile the .sln file unsuccessfully?

  2. If it runs correctly, how can I find the output file of the program? How to see the particle coordinate after all?

I just see the fixed particle coordinates after the Matlab code in the folder
C:\Users\user\Desktop\Le _ AI project NTHU\packing-generation-master\Docs\MATLAB scripts for interpreting results

Thank you!
Le

a2
a1

@VasiliBaranov
Copy link
Owner

Hi Le.

i think you compiled the program correctly. Please note that you can change the parameters of the config after compiling the program (the program reads it when it runs), that's the point of the config file.

For program execution, please refer to the readme, here: https://github.com/VasiliBaranov/packing-generation#1-program-execution Specifically, please copy the generation.conf and possibly packing.xyzd files to the folder where you .exe lies. You don't need to copy packing.xyzd if you specify in the config that you need random starting particle coordinates and particles of the same size. If you want to generate a polydisperse packing, you anyway need to copy either a packing.xyzd or diameters.txt.

If the program outputs a packing.nfo in the same folder where it runs, it has completed successfully. Hope this helps! Please also refer to the main project page for more details!

Best Regards,
Vasili

@tuyen-le
Copy link
Author

tuyen-le commented Sep 6, 2019

Dear Mr.Baranow,

Amazing! I can execution file now.

I will change the parameters of the config after compiling the program after first running.

I also will design the diameter of all particles via diameters.txt.

Thank you very much for your kind help!

Really appreciate that!

Le

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants